
	.section .rodata
	LC0: .asciz "teste de case multiplo\n"
	LI0 = .-LC0
	LC1: .asciz "teste de case simples\n"
	LI1 = .-LC1
	LC2: .asciz "teste de goto\n"
	LI2 = .-LC2

	.section .bss
	 .comm x_,4,4

	.section .text

	.globl main
	.type main,@function

main: 
	pushl %ebp
	movl (%esp),%ebp
	movl $0,%eax
	movl %eax,x_
.L1:
	movl x_,%eax
	pushl %eax
	movl $1,%eax
	cmpl	%eax,(%esp)
	je .L3
	movl $2,%eax
	cmpl	%eax,(%esp)
	je .L3
	jmp .L4
.L3:
	pushl %eax
	pushl %ebx
	pushl %ecx
	pushl %edx
	movl $4,%eax
	movl $1,%ebx
	movl	$LC0, %ecx
	movl	$LI0, %edx
	int $0x80
	popl %edx
	popl %ecx
	popl %ebx
	popl %eax
	jmp .L2
.L4:
	movl $3,%eax
	cmpl	%eax,(%esp)
	je .L5
	jmp .L6
.L5:
	pushl %eax
	pushl %ebx
	pushl %ecx
	pushl %edx
	movl $4,%eax
	movl $1,%ebx
	movl	$LC1, %ecx
	movl	$LI1, %edx
	int $0x80
	popl %edx
	popl %ecx
	popl %ebx
	popl %eax
	jmp .L2
.L6:
.L2:
	movl x_,%eax
	pushl %eax
	movl $1,%eax
	addl	%eax,(%esp)
	popl	%eax
	movl %eax,x_
	pushl %eax
	pushl %ebx
	pushl %ecx
	pushl %edx
	movl $4,%eax
	movl $1,%ebx
	movl	$LC2, %ecx
	movl	$LI2, %edx
	int $0x80
	popl %edx
	popl %ecx
	popl %ebx
	popl %eax
	movl x_,%eax
	pushl %eax
	movl $4,%eax
	cmpl	%eax,(%esp)
	jge .L7
	jmp .L1
.L7:

#end program (exit)
	movl $1,%eax
	movl $0,%ebx
	int $0x80
